using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using QuanLySim.DAO;
using QuanLySim.DTO;

namespace QuanLySim.BLO
{
    class clsMangBLO
    {
        private clsMangDAO m_MangDao;
        private clsMangDTO m_MangDto;
        private string m_Erorr;

        #region "property"
        public string ERORR
        {
            get { return m_Erorr; }
        }

        public clsMangBLO()
        {
            m_MangDao = new clsMangDAO();
            m_MangDto = new clsMangDTO();
        }

        internal clsMangDTO MANGDTO
        {
            get { return m_MangDto; }
            set { m_MangDto = value; }
        }
        #endregion

        public bool Insert()
        {
            return m_MangDao.Insert(m_MangDto);
        }

        public bool DeleteDauSo()
        {
            return m_MangDao.DeleteDauSo(m_MangDto);
        }

        public bool DeleteMang()
        {
            return m_MangDao.DeleteMang(m_MangDto);
        }

        public bool UpdateMang()
        {
            return m_MangDao.UpdateMang(m_MangDto);
        }

        public DataTable LoaiMang()
        {
            m_MangDao = new clsMangDAO();
            m_Erorr = m_MangDao.ERORR;
            return m_MangDao.LoaiMang();
        }

        public DataTable DauSo()
        {
            m_MangDao = new clsMangDAO();
            m_Erorr = m_MangDao.ERORR;
            return m_MangDao.DauSo(m_MangDto);
        }
    }
}
